package com.hllxd.hism.star.basic.service.service;

import com.hllxd.hism.star.basic.service.dao.http.OpenaiApiMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author xiyong.lxy
 * @date 2020-10-12 16:51
 * v1/user/userInfo.do
 */
@Slf4j
@Service("openaiService")
public class OpenaiServiceImpl implements OpenaiService {

    @Autowired
    private OpenaiApiMapper openaiApiMapper;

    @Override
    public String questionHandle(String question) {
        String result = openaiApiMapper.handle(question, null, null);
        log.info("request: {}, result: {}.", question, result);
        return result;
    }
}
